home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 October: Mac OS SDK / Dev.CD Oct 00 SDK1.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / AppleTalk.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  51.5 KB  |  1,490 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        AppleTalk.h
  3.  
  4.      Contains:    AppleTalk Interfaces.
  5.  
  6.      Version:    Technology:    System 8.5
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1985-1999 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __APPLETALK__
  18. #define __APPLETALK__
  19.  
  20. #ifndef __MACTYPES__
  21.     #include <MacTypes.h>
  22. #endif
  23.  
  24. #ifndef __OSUTILS__
  25.     #include <OSUtils.h>
  26. #endif
  27.  
  28.  
  29.  
  30.  
  31. #if PRAGMA_ONCE
  32. #pragma once
  33. #endif
  34.  
  35. #ifdef __cplusplus
  36. extern "C" {
  37. #endif
  38.  
  39. #if PRAGMA_IMPORT
  40. #pragma import on
  41. #endif
  42.  
  43. #if PRAGMA_STRUCT_ALIGN
  44.     #pragma options align=mac68k
  45. #elif PRAGMA_STRUCT_PACKPUSH
  46.     #pragma pack(push, 2)
  47. #elif PRAGMA_STRUCT_PACK
  48.     #pragma pack(2)
  49. #endif
  50.  
  51. enum {
  52.                                                                 /* Driver unit numbers (ADSP is dynamic) */
  53.     mppUnitNum                    = 9,                            /* MPP unit number */
  54.     atpUnitNum                    = 10,                            /* ATP unit number */
  55.     xppUnitNum                    = 40                            /* XPP unit number */
  56. };
  57.  
  58. enum {
  59.                                                                 /* Driver refNums (ADSP is dynamic) */
  60.     mppRefNum                    = -10,                            /* MPP reference number */
  61.     atpRefNum                    = -11,                            /* ATP reference number */
  62.     xppRefNum                    = -41                            /* XPP reference number */
  63. };
  64.  
  65. enum {
  66.                                                                 /* .MPP csCodes */
  67.     lookupReply                    = 242,                            /* This command queued to ourself */
  68.     writeLAP                    = 243,                            /* Write out LAP packet */
  69.     detachPH                    = 244,                            /* Detach LAP protocol handler */
  70.     attachPH                    = 245,                            /* Attach LAP protocol handler */
  71.     writeDDP                    = 246,                            /* Write out DDP packet */
  72.     closeSkt                    = 247,                            /* Close DDP socket */
  73.     openSkt                        = 248,                            /* Open DDP socket */
  74.     loadNBP                        = 249,                            /* Load NBP command-executing code */
  75.     lastResident                = 249,                            /* Last resident command */
  76.     confirmName                    = 250,                            /* Confirm name */
  77.     lookupName                    = 251,                            /* Look up name on internet */
  78.     removeName                    = 252,                            /* Remove name from Names Table */
  79.     registerName                = 253,                            /* Register name in Names Table */
  80.     killNBP                        = 254,                            /* Kill outstanding NBP request */
  81.     unloadNBP                    = 255,                            /* Unload NBP command code */
  82.     setSelfSend                    = 256,                            /* MPP: Set to allow writes to self */
  83.     SetMyZone                    = 257,                            /* Set my zone name */
  84.     GetATalkInfo                = 258,                            /* get AppleTalk information */
  85.     ATalkClosePrep                = 259                            /* AppleTalk close query */
  86. };
  87.  
  88. enum {
  89.                                                                 /* .ATP csCodes */
  90.     nSendRequest                = 248,                            /* NSendRequest code */
  91.     relRspCB                    = 249,                            /* Release RspCB */
  92.     closeATPSkt                    = 250,                            /* Close ATP socket */
  93.     addResponse                    = 251,                            /* Add response code | Require open skt */
  94.     sendResponse                = 252,                            /* Send response code */
  95.     getRequest                    = 253,                            /* Get request code */
  96.     openATPSkt                    = 254,                            /* Open ATP socket */
  97.     sendRequest                    = 255,                            /* Send request code */
  98.     relTCB                        = 256,                            /* Release TCB */
  99.     killGetReq                    = 257,                            /* Kill GetRequest */
  100.     killSendReq                    = 258,                            /* Kill SendRequest */
  101.     killAllGetReq                = 259                            /* Kill all getRequests for a skt */
  102. };
  103.  
  104. enum {
  105.                                                                 /* .XPP csCodes */
  106.     openSess                    = 255,                            /* Open session */
  107.     closeSess                    = 254,                            /* Close session */
  108.     userCommand                    = 253,                            /* User command */
  109.     userWrite                    = 252,                            /* User write */
  110.     getStatus                    = 251,                            /* Get status */
  111.     afpCall                        = 250,                            /* AFP command (buffer has command code) */
  112.     getParms                    = 249,                            /* Get parameters */
  113.     abortOS                        = 248,                            /* Abort open session request */
  114.     closeAll                    = 247,                            /* Close all open sessions */
  115.     xCall                        = 246                            /* .XPP extended calls */
  116. };
  117.  
  118. enum {
  119.                                                                 /* Transition Queue transition types */
  120.     ATTransOpen                    = 0,                            /*AppleTalk has opened*/
  121.     ATTransClose                = 2,                            /*AppleTalk is about to close*/
  122.     ATTransClosePrep            = 3,                            /*Is it OK to close AppleTalk ?*/
  123.     ATTransCancelClose            = 4                                /*Cancel the ClosePrep transition*/
  124. };
  125.  
  126. enum {
  127.     afpByteRangeLock            = 1,                            /*AFPCall command codes*/
  128.     afpVolClose                    = 2,                            /*AFPCall command codes*/
  129.     afpDirClose                    = 3,                            /*AFPCall command codes*/
  130.     afpForkClose                = 4,                            /*AFPCall command codes*/
  131.     afpCopyFile                    = 5,                            /*AFPCall command codes*/
  132.     afpDirCreate                = 6,                            /*AFPCall command codes*/
  133.     afpFileCreate                = 7,                            /*AFPCall command codes*/
  134.     afpDelete                    = 8,                            /*AFPCall command codes*/
  135.     afpEnumerate                = 9,                            /*AFPCall command codes*/
  136.     afpFlush                    = 10,                            /*AFPCall command codes*/
  137.     afpForkFlush                = 11,                            /*AFPCall command codes*/
  138.     afpGetDirParms                = 12,                            /*AFPCall command codes*/
  139.     afpGetFileParms                = 13,                            /*AFPCall command codes*/
  140.     afpGetForkParms                = 14,                            /*AFPCall command codes*/
  141.     afpGetSInfo                    = 15,                            /*AFPCall command codes*/
  142.     afpGetSParms                = 16,                            /*AFPCall command codes*/
  143.     afpGetVolParms                = 17,                            /*AFPCall command codes*/
  144.     afpLogin                    = 18,                            /*AFPCall command codes*/
  145.     afpContLogin                = 19,                            /*AFPCall command codes*/
  146.     afpLogout                    = 20,                            /*AFPCall command codes*/
  147.     afpMapID                    = 21,                            /*AFPCall command codes*/
  148.     afpMapName                    = 22,                            /*AFPCall command codes*/
  149.     afpMove                        = 23,                            /*AFPCall command codes*/
  150.     afpOpenVol                    = 24,                            /*AFPCall command codes*/
  151.     afpOpenDir                    = 25,                            /*AFPCall command codes*/
  152.     afpOpenFork                    = 26,                            /*AFPCall command codes*/
  153.     afpRead                        = 27,                            /*AFPCall command codes*/
  154.     afpRename                    = 28,                            /*AFPCall command codes*/
  155.     afpSetDirParms                = 29,                            /*AFPCall command codes*/
  156.     afpSetFileParms                = 30,                            /*AFPCall command codes*/
  157.     afpSetForkParms                = 31,                            /*AFPCall command codes*/
  158.     afpSetVolParms                = 32,                            /*AFPCall command codes*/
  159.     afpWrite                    = 33,                            /*AFPCall command codes*/
  160.     afpGetFlDrParms                = 34,                            /*AFPCall command codes*/
  161.     afpSetFlDrParms                = 35,                            /*AFPCall command codes*/
  162.     afpDTOpen                    = 48,                            /*AFPCall command codes*/
  163.     afpDTClose                    = 49,                            /*AFPCall command codes*/
  164.     afpGetIcon                    = 51,                            /*AFPCall command codes*/
  165.     afpGtIcnInfo                = 52,                            /*AFPCall command codes*/
  166.     afpAddAPPL                    = 53,                            /*AFPCall command codes*/
  167.     afpRmvAPPL                    = 54,                            /*AFPCall command codes*/
  168.     afpGetAPPL                    = 55,                            /*AFPCall command codes*/
  169.     afpAddCmt                    = 56,                            /*AFPCall command codes*/
  170.     afpRmvCmt                    = 57,                            /*AFPCall command codes*/
  171.     afpGetCmt                    = 58,                            /*AFPCall command codes*/
  172.     afpAddIcon                    = 192                            /*Special code for ASP Write commands*/
  173. };
  174.  
  175. enum {
  176.     xppLoadedBit                = 5,                            /* XPP bit in PortBUse */
  177.     scbMemSize                    = 192,                            /* Size of memory for SCB */
  178.     xppFlagClr                    = 0                                /* Cs for AFPCommandBlock */
  179. };
  180.  
  181. enum {
  182.     xppFlagSet                    = 128                            /* StartEndFlag & NewLineFlag fields. */
  183. };
  184.  
  185. enum {
  186.     lapSize                        = 20,
  187.     ddpSize                        = 26,
  188.     nbpSize                        = 26,
  189.     atpSize                        = 56
  190. };
  191.  
  192. enum {
  193.     atpXOvalue                    = 32,                            /*ATP exactly-once bit */
  194.     atpEOMvalue                    = 16,                            /*ATP End-Of-Message bit */
  195.     atpSTSvalue                    = 8,                            /*ATP Send-Transmission-Status bit */
  196.     atpTIDValidvalue            = 2,                            /*ATP trans. ID valid bit */
  197.     atpSendChkvalue                = 1                                /*ATP send checksum bit */
  198. };
  199.  
  200. enum {
  201.     zipGetLocalZones            = 5,
  202.     zipGetZoneList                = 6,
  203.     zipGetMyZone                = 7
  204. };
  205.  
  206. enum {
  207.     LAPMgrPtr                    = 0x0B18                        /*Entry point for LAP Manager*/
  208. };
  209.  
  210. enum {
  211.     LAPMgrCall                    = 2,                            /*Offset to LAP routines*/
  212.     LAddAEQ                        = 23,                            /*LAPAddATQ routine selector*/
  213.     LRmvAEQ                        = 24                            /*LAPRmvATQ routine selector*/
  214. };
  215.  
  216. #define MPPioCompletion MPP.ioCompletion
  217. #define MPPioResult MPP.ioResult
  218. #define MPPioRefNum MPP.ioRefNum
  219. #define MPPcsCode MPP.csCode
  220. #define LAPprotType LAP.protType
  221. #define LAPwdsPointer LAP.u.wdsPointer
  222. #define LAPhandler LAP.u.handler
  223. #define DDPsocket DDP.socket
  224. #define DDPchecksumFlag DDP.checksumFlag
  225. #define DDPwdsPointer DDP.u.wdsPointer
  226. #define DDPlistener DDP.u.listener
  227. #define NBPinterval NBP.interval
  228. #define NBPcount NBP.count
  229. #define NBPntQElPtr NBP.nbpPtrs.ntQElPtr
  230. #define NBPentityPtr NBP.nbpPtrs.entityPtr
  231. #define NBPverifyFlag NBP.parm.verifyFlag
  232. #define NBPretBuffPtr NBP.parm.Lookup.retBuffPtr
  233. #define NBPretBuffSize NBP.parm.Lookup.retBuffSize
  234. #define NBPmaxToGet NBP.parm.Lookup.maxToGet
  235. #define NBPnumGotten NBP.parm.Lookup.numGotten
  236. #define NBPconfirmAddr NBP.parm.Confirm.confirmAddr
  237. #define NBPnKillQEl NBPKILL.nKillQEl
  238. #define NBPnewSocket NBP.parm.Confirm.newSocket
  239. #define ATPioCompletion ATP.ioCompletion
  240. #define ATPioResult ATP.ioResult
  241. #define ATPuserData ATP.userData
  242. #define ATPreqTID ATP.reqTID
  243. #define ATPioRefNum ATP.ioRefNum
  244. #define ATPcsCode ATP.csCode
  245. #define ATPatpSocket ATP.atpSocket
  246. #define ATPatpFlags ATP.atpFlags
  247. #define ATPaddrBlock ATP.addrBlock
  248. #define ATPreqLength ATP.reqLength
  249. #define ATPreqPointer ATP.reqPointer
  250. #define ATPbdsPointer ATP.bdsPointer
  251. #define ATPtimeOutVal SREQ.timeOutVal
  252. #define ATPnumOfResps SREQ.numOfResps
  253. #define ATPretryCount SREQ.retryCount
  254. #define ATPnumOfBuffs OTH1.u.numOfBuffs
  255. #define ATPbitMap OTH1.u.bitMap
  256. #define ATPrspNum OTH1.u.rspNum
  257. #define ATPbdsSize OTH2.bdsSize
  258. #define ATPtransID OTH2.transID
  259. #define ATPaKillQEl KILL.aKillQEl
  260. enum {
  261.     tLAPRead                    = 0,
  262.     tLAPWrite                    = 1,
  263.     tDDPRead                    = 2,
  264.     tDDPWrite                    = 3,
  265.     tNBPLookup                    = 4,
  266.     tNBPConfirm                    = 5,
  267.     tNBPRegister                = 6,
  268.     tATPSndRequest                = 7,
  269.     tATPGetRequest                = 8,
  270.     tATPSdRsp                    = 9,
  271.     tATPAddRsp                    = 10,
  272.     tATPRequest                    = 11,
  273.     tATPResponse                = 12
  274. };
  275.  
  276. typedef SInt8                             ABCallType;
  277. enum {
  278.     lapProto                    = 0,
  279.     ddpProto                    = 1,
  280.     nbpProto                    = 2,
  281.     atpProto                    = 3
  282. };
  283.  
  284. typedef UInt8                             ABProtoType;
  285. typedef Byte                             ABByte;
  286.  
  287. struct LAPAdrBlock {
  288.     UInt8                             dstNodeID;
  289.     UInt8                             srcNodeID;
  290.     ABByte                             lapProtType;
  291.     UInt8                             filler;                        /*    Filler for proper byte alignment*/
  292. };
  293. typedef struct LAPAdrBlock                LAPAdrBlock;
  294. typedef struct ATQEntry                 ATQEntry;
  295.  
  296. typedef ATQEntry *                        ATQEntryPtr;
  297. typedef CALLBACK_API_C( long , ATalkTransitionEventProcPtr )(long eventCode, ATQEntryPtr qElem, void *eventParameter);
  298. typedef STACK_UPP_TYPE(ATalkTransitionEventProcPtr)             ATalkTransitionEventUPP;
  299. typedef ATalkTransitionEventUPP         ATalkTransitionEvent;
  300.  
  301. struct ATQEntry {
  302.     struct ATQEntry *                qLink;                        /*next queue entry*/
  303.     short                             qType;                        /*queue type*/
  304.     ATalkTransitionEventUPP         CallAddr;                    /*your routine descriptor*/
  305. };
  306.  
  307. /* 
  308.     Real definition of EntityName is 3 PACKED strings of any length (32 is just an example). No
  309.     offests for Asm since each String address must be calculated by adding length byte to last string ptr.
  310.     In Pascal, String(32) will be 34 bytes long since fields never start on an odd byte unless they are 
  311.     only a byte long. So this will generate correct looking interfaces for Pascal and C, but they will not
  312.     be the same, which is OK since they are not used. 
  313. */
  314.  
  315. struct EntityName {
  316.     Str32Field                         objStr;
  317.     Str32Field                         typeStr;
  318.     Str32Field                         zoneStr;
  319. };
  320. typedef struct EntityName                EntityName;
  321.  
  322. typedef EntityName *                    EntityPtr;
  323.  
  324. struct AddrBlock {
  325.     UInt16                             aNet;
  326.     UInt8                             aNode;
  327.     UInt8                             aSocket;
  328. };
  329. typedef struct AddrBlock                AddrBlock;
  330.  
  331. struct RetransType {
  332.     UInt8                             retransInterval;
  333.     UInt8                             retransCount;
  334. };
  335. typedef struct RetransType                RetransType;
  336.  
  337. struct BDSElement {
  338.     short                             buffSize;
  339.     void *                            buffPtr;
  340.     short                             dataSize;
  341.     long                             userBytes;
  342. };
  343. typedef struct BDSElement                BDSElement;
  344.  
  345. typedef BDSElement                         BDSType[8];
  346. typedef BDSElement *                    BDSPtr;
  347. typedef char                             BitMapType;
  348.  
  349. struct ATLAPRec {
  350.     ABCallType                         abOpcode;
  351.     SInt8                             filler;                        /*    Filler for proper byte alignment*/
  352.     short                             abResult;
  353.     long                             abUserReference;
  354.     LAPAdrBlock                     lapAddress;
  355.     short                             lapReqCount;
  356.     short                             lapActCount;
  357.     void *                            lapDataPtr;
  358. };
  359. typedef struct ATLAPRec                    ATLAPRec;
  360. typedef ATLAPRec *                        ATLAPRecPtr;
  361. typedef ATLAPRecPtr *                    ATLAPRecHandle;
  362.  
  363. struct ATDDPRec {
  364.     ABCallType                         abOpcode;
  365.     SInt8                             filler;                        /*    Filler for proper byte alignment*/
  366.     short                             abResult;
  367.     long                             abUserReference;
  368.     short                             ddpType;
  369.     short                             ddpSocket;
  370.     AddrBlock                         ddpAddress;
  371.     short                             ddpReqCount;
  372.     short                             ddpActCount;
  373.     void *                            ddpDataPtr;
  374.     short                             ddpNodeID;
  375. };
  376. typedef struct ATDDPRec                    ATDDPRec;
  377. typedef ATDDPRec *                        ATDDPRecPtr;
  378. typedef ATDDPRecPtr *                    ATDDPRecHandle;
  379.  
  380. struct ATNBPRec {
  381.     ABCallType                         abOpcode;
  382.     SInt8                             filler;                        /*    Filler for proper byte alignment*/
  383.     short                             abResult;
  384.     long                             abUserReference;
  385.     EntityPtr                         nbpEntityPtr;
  386.     void *                            nbpBufPtr;
  387.     short                             nbpBufSize;
  388.     short                             nbpDataField;
  389.     AddrBlock                         nbpAddress;
  390.     RetransType                     nbpRetransmitInfo;
  391. };
  392. typedef struct ATNBPRec                    ATNBPRec;
  393. typedef ATNBPRec *                        ATNBPRecPtr;
  394. typedef ATNBPRecPtr *                    ATNBPRecHandle;
  395.  
  396. struct ATATPRec {
  397.     ABCallType                         abOpcode;
  398.     SInt8                             filler1;                    /*    Filler for proper byte alignment*/
  399.     short                             abResult;
  400.     long                             abUserReference;
  401.     short                             atpSocket;
  402.     AddrBlock                         atpAddress;
  403.     short                             atpReqCount;
  404.     void *                            atpDataPtr;
  405.     BDSPtr                             atpRspBDSPtr;
  406.     BitMapType                         atpBitMap;
  407.     SInt8                             filler2;                    /*    Filler for proper byte alignment*/
  408.     short                             atpTransID;
  409.     short                             atpActCount;
  410.     long                             atpUserData;
  411.     Boolean                         atpXO;
  412.     Boolean                         atpEOM;
  413.     short                             atpTimeOut;
  414.     short                             atpRetries;
  415.     short                             atpNumBufs;
  416.     short                             atpNumRsp;
  417.     short                             atpBDSSize;
  418.     long                             atpRspUData;
  419.     void *                            atpRspBuf;
  420.     short                             atpRspSize;
  421. };
  422. typedef struct ATATPRec                    ATATPRec;
  423. typedef ATATPRec *                        ATATPRecPtr;
  424. typedef ATATPRecPtr *                    ATATPRecHandle;
  425.  
  426. struct AFPCommandBlock {
  427.     UInt8                             cmdByte;
  428.     UInt8                             startEndFlag;
  429.     short                             forkRefNum;
  430.     long                             rwOffset;
  431.     long                             reqCount;
  432.     UInt8                             newLineFlag;
  433.     char                             newLineChar;
  434. };
  435. typedef struct AFPCommandBlock            AFPCommandBlock;
  436. typedef union MPPParamBlock             MPPParamBlock;
  437. typedef union ATPParamBlock             ATPParamBlock;
  438. typedef union XPPParamBlock             XPPParamBlock;
  439.  
  440. typedef MPPParamBlock *                    MPPPBPtr;
  441. typedef ATPParamBlock *                    ATPPBPtr;
  442. typedef XPPParamBlock *                    XPPParmBlkPtr;
  443. typedef CALLBACK_API( void , MPPCompletionProcPtr )(MPPPBPtr thePBptr);
  444. /*
  445.     WARNING: MPPCompletionProcPtr uses register based parameters under classic 68k
  446.              and cannot be written in a high-level language without 
  447.              the help of mixed mode or assembly glue.
  448. */
  449. typedef CALLBACK_API( void , ATPCompletionProcPtr )(ATPPBPtr thePBptr);
  450. /*
  451.     WARNING: ATPCompletionProcPtr uses register based parameters under classic 68k
  452.              and cannot be written in a high-level language without 
  453.              the help of mixed mode or assembly glue.
  454. */
  455. typedef CALLBACK_API( void , XPPCompletionProcPtr )(XPPParmBlkPtr thePBptr);
  456. /*
  457.     WARNING: XPPCompletionProcPtr uses register based parameters under classic 68k
  458.              and cannot be written in a high-level language without 
  459.              the help of mixed mode or assembly glue.
  460. */
  461. typedef CALLBACK_API( void , AttnRoutineProcPtr )(short sessRefnum, short attnBytes);
  462. /*
  463.     WARNING: AttnRoutineProcPtr uses register based parameters under classic 68k
  464.              and cannot be written in a high-level language without 
  465.              the help of mixed mode or assembly glue.
  466. */
  467. typedef REGISTER_UPP_TYPE(MPPCompletionProcPtr)                 MPPCompletionUPP;
  468. typedef REGISTER_UPP_TYPE(ATPCompletionProcPtr)                 ATPCompletionUPP;
  469. typedef REGISTER_UPP_TYPE(XPPCompletionProcPtr)                 XPPCompletionUPP;
  470. typedef REGISTER_UPP_TYPE(AttnRoutineProcPtr)                     AttnRoutineUPP;
  471.  
  472.  
  473. struct WDSElement {
  474.     short                             entryLength;
  475.     Ptr                             entryPtr;
  476. };
  477. typedef struct WDSElement                WDSElement;
  478.  
  479. struct NTElement {
  480.     AddrBlock                         nteAddress;                    /*network address of entity*/
  481.     SInt8                             filler;
  482.     SInt8                             entityData[99];                /*Object, Type & Zone*/
  483. };
  484. typedef struct NTElement                NTElement;
  485.  
  486. struct NamesTableEntry {
  487.     Ptr                             qNext;                        /*ptr to next NTE*/
  488.     NTElement                         nt;
  489. };
  490. typedef struct NamesTableEntry            NamesTableEntry;
  491. typedef CALLBACK_API( Boolean , MPPProtocolHandlerProcPtr )(Ptr SCCAddr1, Ptr SCCAddr2, Ptr MPPLocalVars, Ptr nextFreeByteInRHA, Ptr ReadPacketAndReadRestPtr, short numBytesLeftToReadInPacket);
  492. typedef CALLBACK_API( Boolean , DDPSocketListenerProcPtr )(Ptr SCCAddr1, Ptr SCCAddr2, Ptr MPPLocalVars, Ptr nextFreeByteInRHA, Ptr ReadPacketAndReadRestPtr, UInt8 packetDestinationNumber, short numBytesLeftToReadInPacket);
  493. typedef STACK_UPP_TYPE(MPPProtocolHandlerProcPtr)                 MPPProtocolHandlerUPP;
  494. typedef STACK_UPP_TYPE(DDPSocketListenerProcPtr)                 DDPSocketListenerUPP;
  495. /*
  496.     MPPProtocolHandlerProcs and  DDPSocketListenerProcs cannot be written 
  497.     in or called from a high-level language without the help of mixed mode 
  498.     or assembly glue because they use the following parameter-passing conventions:
  499.  
  500.     typedef Boolean (*MPPProtocolHandlerProcPtr)(Ptr SCCAddr1, Ptr SCCAddr2, 
  501.             Ptr MPPLocalVars, Ptr nextFreeByteInRHA, Ptr ReadPacketAndReadRestPtr, 
  502.             short numBytesLeftToReadInPacket);
  503.  
  504.         In:
  505.             =>    SCCAddr1                    A0.L
  506.             =>    SCCAddr2                    A1.L
  507.             =>    MPPLocalVars                A2.L
  508.             =>    nextFreeByteInRHA            A3.L
  509.             =>    ReadPacketAndReadRestPtr    A4.L
  510.             =>    numBytesLeftToReadInPacket    D1.W
  511.         Out:
  512.             <=    Boolean                        Z bit of CCR
  513.  
  514.     typedef Boolean (*DDPSocketListenerProcPtr)(Ptr SCCAddr1, Ptr SCCAddr2, 
  515.             Ptr MPPLocalVars, Ptr nextFreeByteInRHA, Ptr ReadPacketAndReadRestPtr, 
  516.             UInt8 packetDestinationNumber, short numBytesLeftToReadInPacket);
  517.  
  518.         In:
  519.             =>    SCCAddr1                    A0.L
  520.             =>    SCCAddr2                    A1.L
  521.             =>    MPPLocalVars                A2.L
  522.             =>    nextFreeByteInRHA            A3.L
  523.             =>    ReadPacketAndReadRestPtr    A4.L
  524.             =>    packetDestinationNumber        D0.B
  525.             =>    numBytesLeftToReadInPacket    D1.W
  526.         Out:
  527.             <=    Boolean                        Z bit of CCR
  528.  
  529. */
  530.  
  531. struct MPPparms {
  532.     QElem *                            qLink;                        /*next queue entry*/
  533.     short                             qType;                        /*queue type*/
  534.     short                             ioTrap;                        /*routine trap*/
  535.     Ptr                             ioCmdAddr;                    /*routine address*/
  536.     ATPCompletionUPP                 ioCompletion;                /*ATPCompletionUPP or MPPCompletionUPP*/
  537.     OSErr                             ioResult;                    /*result code*/
  538.     long                             userData;                    /*Command result (ATP user bytes)*/
  539.     short                             reqTID;                        /*request transaction ID*/
  540.     short                             ioRefNum;                    /*driver reference number*/
  541.     short                             csCode;                        /*Call command code*/
  542. };
  543. typedef struct MPPparms                    MPPparms;
  544.  
  545. struct LAPparms {
  546.     QElem *                            qLink;                        /*next queue entry*/
  547.     short                             qType;                        /*queue type*/
  548.     short                             ioTrap;                        /*routine trap*/
  549.     Ptr                             ioCmdAddr;                    /*routine address*/
  550.     ATPCompletionUPP                 ioCompletion;                /*ATPCompletionUPP or MPPCompletionUPP*/
  551.     OSErr                             ioResult;                    /*result code*/
  552.     long                             userData;                    /*Command result (ATP user bytes)*/
  553.     short                             reqTID;                        /*request transaction ID*/
  554.     short                             ioRefNum;                    /*driver reference number*/
  555.     short                             csCode;                        /*Call command code*/
  556.     UInt8                             protType;                    /*ALAP protocol Type */
  557.     UInt8                             filler;
  558.     union {
  559.         void *                            wdsPointer;                /*-> write data structure*/
  560.         MPPProtocolHandlerUPP             handler;                /*-> protocol handler routine*/
  561.     }                                 u;
  562. };
  563. typedef struct LAPparms                    LAPparms;
  564.  
  565. struct DDPparms {
  566.     QElem *                            qLink;                        /*next queue entry*/
  567.     short                             qType;                        /*queue type*/
  568.     short                             ioTrap;                        /*routine trap*/
  569.     Ptr                             ioCmdAddr;                    /*routine address*/
  570.     ATPCompletionUPP                 ioCompletion;                /*ATPCompletionUPP or MPPCompletionUPP*/
  571.     OSErr                             ioResult;                    /*result code*/
  572.     long                             userData;                    /*Command result (ATP user bytes)*/
  573.     short                             reqTID;                        /*request transaction ID*/
  574.     short                             ioRefNum;                    /*driver reference number*/
  575.     short                             csCode;                        /*Call command code*/
  576.     UInt8                             socket;                        /*socket number */
  577.     UInt8                             checksumFlag;                /*check sum flag */
  578.     union {
  579.         void *                            wdsPointer;                /*-> write data structure*/
  580.         DDPSocketListenerUPP             listener;                /*->write data structure or -> Listener*/
  581.     }                                 u;
  582. };
  583. typedef struct DDPparms                    DDPparms;
  584.  
  585. union NBPPtrs {
  586.     Ptr                             ntQElPtr;
  587.     Ptr                             entityPtr;
  588. };
  589. typedef union NBPPtrs                    NBPPtrs;
  590.  
  591. union LookupConfirmParams {
  592.     UInt8                             verifyFlag;
  593.     struct {
  594.         void *                            retBuffPtr;
  595.         short                             retBuffSize;
  596.         short                             maxToGet;
  597.         short                             numGotten;
  598.     }                                 Lookup;
  599.     struct {
  600.         AddrBlock                         confirmAddr;
  601.         UInt8                             newSocket;
  602.         SInt8                             filler;                    /*    Filler for proper byte alignment*/
  603.     }                                 Confirm;
  604. };
  605. typedef union LookupConfirmParams        LookupConfirmParams;
  606.  
  607. struct NBPparms {
  608.     QElem *                            qLink;                        /*next queue entry*/
  609.     short                             qType;                        /*queue type*/
  610.     short                             ioTrap;                        /*routine trap*/
  611.     Ptr                             ioCmdAddr;                    /*routine address*/
  612.     ATPCompletionUPP                 ioCompletion;                /*ATPCompletionUPP or MPPCompletionUPP*/
  613.     OSErr                             ioResult;                    /*result code*/
  614.     long                             userData;                    /*Command result (ATP user bytes)*/
  615.     short                             reqTID;                        /*request transaction ID*/
  616.     short                             ioRefNum;                    /*driver reference number*/
  617.     short                             csCode;                        /*Call command code*/
  618.     UInt8                             interval;                    /*retry interval */
  619.     UInt8                             count;                        /*retry count */
  620.     NBPPtrs                         nbpPtrs;
  621.     LookupConfirmParams             parm;
  622. };
  623. typedef struct NBPparms                    NBPparms;
  624.  
  625. struct SetSelfparms {
  626.     QElem *                            qLink;                        /*next queue entry*/
  627.     short                             qType;                        /*queue type*/
  628.     short                             ioTrap;                        /*routine trap*/
  629.     Ptr                             ioCmdAddr;                    /*routine address*/
  630.     ATPCompletionUPP                 ioCompletion;                /*ATPCompletionUPP or MPPCompletionUPP*/
  631.     OSErr                             ioResult;                    /*result code*/
  632.     long                             userData;                    /*Command result (ATP user bytes)*/
  633.     short                             reqTID;                        /*request transaction ID*/
  634.     short                             ioRefNum;                    /*driver reference number*/
  635.     short                             csCode;                        /*Call command code*/
  636.     UInt8                             newSelfFlag;                /*self-send toggle flag */
  637.     UInt8                             oldSelfFlag;                /*previous self-send state */
  638. };
  639. typedef struct SetSelfparms                SetSelfparms;
  640.  
  641. struct NBPKillparms {
  642.     QElem *                            qLink;                        /*next queue entry*/
  643.     short                             qType;                        /*queue type*/
  644.     short                             ioTrap;                        /*routine trap*/
  645.     Ptr                             ioCmdAddr;                    /*routine address*/
  646.     ATPCompletionUPP                 ioCompletion;                /*ATPCompletionUPP or MPPCompletionUPP*/
  647.     OSErr                             ioResult;                    /*result code*/
  648.     long                             userData;                    /*Command result (ATP user bytes)*/
  649.     short                             reqTID;                        /*request transaction ID*/
  650.     short                             ioRefNum;                    /*driver reference number*/
  651.     short                             csCode;                        /*Call command code*/
  652.     void *                            nKillQEl;                    /*ptr to i/o queue element to cancel */
  653. };
  654. typedef struct NBPKillparms                NBPKillparms;
  655.  
  656.  
  657. struct GetAppleTalkInfoParm {
  658.     QElem *                            qLink;                        /*next queue entry*/
  659.     short                             qType;                        /*queue type*/
  660.     short                             ioTrap;                        /*routine trap*/
  661.     Ptr                             ioCmdAddr;                    /*routine address*/
  662.     ATPCompletionUPP                 ioCompletion;                /*ATPCompletionUPP or MPPCompletionUPP*/
  663.     OSErr                             ioResult;                    /*result code*/
  664.     long                             userData;                    /*Command result (ATP user bytes)*/
  665.     short                             reqTID;                        /*request transaction ID*/
  666.     short                             ioRefNum;                    /*driver reference number*/
  667.     short                             csCode;                        /*Call command code*/
  668.                                                                 /*max. concurrent NBP requests*/
  669.     short                             version;                    /*requested info version*/
  670.     void *                            varsPtr;                    /*pointer to well known MPP vars*/
  671.     void *                            DCEPtr;                        /*pointer to MPP DCE*/
  672.     short                             portID;                        /*port number [0..7]*/
  673.     long                             configuration;                /*32-bit configuration word*/
  674.     short                             selfSend;                    /*non zero if SelfSend enabled*/
  675.     short                             netLo;                        /*low value of network range*/
  676.     short                             netHi;                        /*high value of network range*/
  677.     long                             ourAdd;                        /*our 24-bit AppleTalk address*/
  678.     long                             routerAddr;                    /*24-bit address of (last) router*/
  679.     short                             numOfPHs;                    /*max. number of protocol handlers*/
  680.     short                             numOfSkts;                    /*max. number of static sockets*/
  681.     short                             numNBPEs;                    /*max. concurrent NBP requests*/
  682.     void *                            nTQueue;                    /*pointer to registered name queue*/
  683.     short                             LAlength;                    /*length in bytes of data link addr*/
  684.     void *                            linkAddr;                    /*data link address returned*/
  685.     Ptr                             zoneName;                    /*zone name returned*/
  686. };
  687. typedef struct GetAppleTalkInfoParm        GetAppleTalkInfoParm;
  688.  
  689. struct ATalkClosePrepParm {
  690.     QElem *                            qLink;                        /*next queue entry*/
  691.     short                             qType;                        /*queue type*/
  692.     short                             ioTrap;                        /*routine trap*/
  693.     Ptr                             ioCmdAddr;                    /*routine address*/
  694.     ATPCompletionUPP                 ioCompletion;                /*ATPCompletionUPP or MPPCompletionUPP*/
  695.     OSErr                             ioResult;                    /*result code*/
  696.     long                             userData;                    /*Command result (ATP user bytes)*/
  697.     short                             reqTID;                        /*request transaction ID*/
  698.     short                             ioRefNum;                    /*driver reference number*/
  699.     short                             csCode;                        /*Call command code*/
  700.     Ptr                             appName;                    /*pointer to application name in buffer*/
  701. };
  702. typedef struct ATalkClosePrepParm        ATalkClosePrepParm;
  703.  
  704. union MPPParamBlock {
  705.     MPPparms                         MPP;                        /*General MPP parms*/
  706.     LAPparms                         LAP;                        /*ALAP calls*/
  707.     DDPparms                         DDP;                        /*DDP calls*/
  708.     NBPparms                         NBP;                        /*NBP calls*/
  709.     SetSelfparms                     SETSELF;
  710.     NBPKillparms                     NBPKILL;
  711.     GetAppleTalkInfoParm             GAIINFO;
  712.     ATalkClosePrepParm                 ATALKCLOSE;
  713. };
  714.  
  715.  
  716. struct XPPPrmBlk {
  717.     QElem *                            qLink;
  718.     short                             qType;
  719.     short                             ioTrap;
  720.     Ptr                             ioCmdAddr;
  721.     XPPCompletionUPP                 ioCompletion;
  722.     OSErr                             ioResult;
  723.     long                             cmdResult;
  724.     short                             ioVRefNum;
  725.     short                             ioRefNum;
  726.     short                             csCode;
  727.     short                             sessRefnum;                    /*Offset to session refnum */
  728.     UInt8                             aspTimeout;                    /*Timeout for ATP */
  729.     UInt8                             aspRetry;                    /*Retry count for ATP */
  730.     short                             cbSize;                        /*Command block size */
  731.     Ptr                             cbPtr;                        /*Command block pointer */
  732.     short                             rbSize;                        /*Reply buffer size */
  733.     Ptr                             rbPtr;                        /*Reply buffer pointer */
  734.     short                             wdSize;                        /*Write Data size*/
  735.     Ptr                             wdPtr;                        /*Write Data pointer*/
  736.     UInt8                             ccbStart[296];                /*CCB memory allocated for driver afpWrite max size(CCB)=296 all other calls=150*/
  737. };
  738. typedef struct XPPPrmBlk                XPPPrmBlk;
  739.  
  740. struct ASPGetparmsBlk {
  741.     QElem *                            qLink;
  742.     short                             qType;
  743.     short                             ioTrap;
  744.     Ptr                             ioCmdAddr;
  745.     XPPCompletionUPP                 ioCompletion;
  746.     OSErr                             ioResult;
  747.     long                             cmdResult;
  748.     short                             ioVRefNum;
  749.     short                             ioRefNum;
  750.     short                             csCode;
  751.     short                             aspMaxCmdSize;                /*For SPGetParms*/
  752.     short                             aspQuantumSize;
  753.     short                             numSesss;
  754. };
  755. typedef struct ASPGetparmsBlk            ASPGetparmsBlk;
  756.  
  757. struct ASPAbortPrm {
  758.     QElem *                            qLink;
  759.     short                             qType;
  760.     short                             ioTrap;
  761.     Ptr                             ioCmdAddr;
  762.     XPPCompletionUPP                 ioCompletion;
  763.     OSErr                             ioResult;
  764.     long                             cmdResult;
  765.     short                             ioVRefNum;
  766.     short                             ioRefNum;
  767.     short                             csCode;
  768.     Ptr                             abortSCBPtr;                /*SCB pointer for AbortOS */
  769. };
  770. typedef struct ASPAbortPrm                ASPAbortPrm;
  771.  
  772. struct ASPOpenPrm {
  773.     QElem *                            qLink;
  774.     short                             qType;
  775.     short                             ioTrap;
  776.     Ptr                             ioCmdAddr;
  777.     XPPCompletionUPP                 ioCompletion;
  778.     OSErr                             ioResult;
  779.     long                             cmdResult;
  780.     short                             ioVRefNum;
  781.     short                             ioRefNum;
  782.     short                             csCode;
  783.     short                             sessRefnum;                    /*Offset to session refnum */
  784.     UInt8                             aspTimeout;                    /*Timeout for ATP */
  785.     UInt8                             aspRetry;                    /*Retry count for ATP */
  786.     AddrBlock                         serverAddr;                    /*Server address block */
  787.     Ptr                             scbPointer;                    /*SCB pointer */
  788.     AttnRoutineUPP                     attnRoutine;                /*Attention routine pointer*/
  789. };
  790. typedef struct ASPOpenPrm                ASPOpenPrm;
  791. typedef ASPOpenPrm *                    ASPOpenPrmPtr;
  792.  
  793. struct AFPLoginPrm {
  794.     QElem *                            qLink;
  795.     short                             qType;
  796.     short                             ioTrap;
  797.     Ptr                             ioCmdAddr;
  798.     XPPCompletionUPP                 ioCompletion;
  799.     OSErr                             ioResult;
  800.     long                             cmdResult;
  801.     short                             ioVRefNum;
  802.     short                             ioRefNum;
  803.     short                             csCode;
  804.     short                             sessRefnum;                    /*Offset to session refnum */
  805.     UInt8                             aspTimeout;                    /*Timeout for ATP */
  806.     UInt8                             aspRetry;                    /*Retry count for ATP */
  807.     short                             cbSize;                        /*Command block size */
  808.     void *                            cbPtr;                        /*Command block pointer */
  809.     short                             rbSize;                        /*Reply buffer size */
  810.     void *                            rbPtr;                        /*Reply buffer pointer */
  811.     AddrBlock                         afpAddrBlock;                /*block in AFP login */
  812.     void *                            afpSCBPtr;                    /*SCB pointer in AFP login */
  813.     AttnRoutineUPP                     afpAttnRoutine;                /*routine pointer in AFP login */
  814.     UInt8                             ccbFill[144];                /*CCB memory allocated for driver  Login needs only 150 bytes BUT CCB really starts in the middle of AFPSCBPtr and also clobbers AFPAttnRoutine. */
  815. };
  816. typedef struct AFPLoginPrm                AFPLoginPrm;
  817.  
  818. struct XCallParam {
  819.     QElem *                            qLink;
  820.     short                             qType;
  821.     short                             ioTrap;
  822.     Ptr                             ioCmdAddr;
  823.     XPPCompletionUPP                 ioCompletion;
  824.     OSErr                             ioResult;
  825.     long                             cmdResult;
  826.     short                             ioVRefNum;
  827.     short                             ioRefNum;
  828.     short                             csCode;
  829.     short                             xppSubCode;
  830.     UInt8                             xppTimeout;                    /*retry interval (seconds)*/
  831.     UInt8                             xppRetry;                    /*retry count*/
  832.     short                             filler1;
  833.     void *                            zipBuffPtr;                    /*pointer to buffer (must be 578 bytes)*/
  834.     short                             zipNumZones;                /*no. of zone names in this response*/
  835.     UInt8                             zipLastFlag;                /*non-zero if no more zones*/
  836.     UInt8                             filler2;                    /*filler*/
  837.     UInt8                             zipInfoField[70];            /*on initial call, set first word to zero*/
  838. };
  839. typedef struct XCallParam                XCallParam;
  840.  
  841. union XPPParamBlock {
  842.     XPPPrmBlk                         XPP;
  843.     ASPGetparmsBlk                     GETPARM;
  844.     ASPAbortPrm                     ABORT;
  845.     ASPOpenPrm                         OPEN;
  846.     AFPLoginPrm                     LOGIN;
  847.     XCallParam                         XCALL;
  848. };
  849.  
  850.  
  851.  
  852. struct ATPparms {
  853.     QElem *                            qLink;                        /*next queue entry*/
  854.     short                             qType;                        /*queue type*/
  855.     short                             ioTrap;                        /*routine trap*/
  856.     Ptr                             ioCmdAddr;                    /*routine address*/
  857.     ATPCompletionUPP                 ioCompletion;                /*ATPCompletionUPP or MPPCompletionUPP*/
  858.     OSErr                             ioResult;                    /*result code*/
  859.     long                             userData;                    /*Command result (ATP user bytes)*/
  860.     short                             reqTID;                        /*request transaction ID*/
  861.     short                             ioRefNum;                    /*driver reference number*/
  862.     short                             csCode;                        /*Call command code*/
  863.     UInt8                             atpSocket;                    /*currbitmap for requests or ATP socket number*/
  864.     UInt8                             atpFlags;                    /*control information*/
  865.     AddrBlock                         addrBlock;                    /*source/dest. socket address*/
  866.     short                             reqLength;                    /*request/response length*/
  867.     void *                            reqPointer;                    /*->request/response Data*/
  868.     void *                            bdsPointer;                    /*->response BDS */
  869. };
  870. typedef struct ATPparms                    ATPparms;
  871.  
  872. struct SendReqparms {
  873.     QElem *                            qLink;                        /*next queue entry*/
  874.     short                             qType;                        /*queue type*/
  875.     short                             ioTrap;                        /*routine trap*/
  876.     Ptr                             ioCmdAddr;                    /*routine address*/
  877.     ATPCompletionUPP                 ioCompletion;                /*ATPCompletionUPP or MPPCompletionUPP*/
  878.     OSErr                             ioResult;                    /*result code*/
  879.     long                             userData;                    /*Command result (ATP user bytes)*/
  880.     short                             reqTID;                        /*request transaction ID*/
  881.     short                             ioRefNum;                    /*driver reference number*/
  882.     short                             csCode;                        /*Call command code*/
  883.     UInt8                             atpSocket;                    /*currbitmap for requests or ATP socket number*/
  884.     UInt8                             atpFlags;                    /*control information*/
  885.     AddrBlock                         addrBlock;                    /*source/dest. socket address*/
  886.     short                             reqLength;                    /*request/response length*/
  887.     void *                            reqPointer;                    /*->request/response Data*/
  888.     void *                            bdsPointer;                    /*->response BDS */
  889.     UInt8                             numOfBuffs;                    /*numOfBuffs */
  890.     UInt8                             timeOutVal;                    /*timeout interval */
  891.     UInt8                             numOfResps;                    /*number of responses actually received */
  892.     UInt8                             retryCount;                    /*number of retries */
  893.     short                             intBuff;                    /*used internally for NSendRequest */
  894.     UInt8                             TRelTime;                    /*TRelease time for extended send request */
  895.     SInt8                             filler0;
  896. };
  897. typedef struct SendReqparms                SendReqparms;
  898.  
  899.  
  900. struct ATPmisc1 {
  901.     QElem *                            qLink;                        /*next queue entry*/
  902.     short                             qType;                        /*queue type*/
  903.     short                             ioTrap;                        /*routine trap*/
  904.     Ptr                             ioCmdAddr;                    /*routine address*/
  905.     ATPCompletionUPP                 ioCompletion;                /*ATPCompletionUPP or MPPCompletionUPP*/
  906.     OSErr                             ioResult;                    /*result code*/
  907.     long                             userData;                    /*Command result (ATP user bytes)*/
  908.     short                             reqTID;                        /*request transaction ID*/
  909.     short                             ioRefNum;                    /*driver reference number*/
  910.     short                             csCode;                        /*Call command code*/
  911.     UInt8                             atpSocket;                    /*currbitmap for requests or ATP socket number*/
  912.     UInt8                             atpFlags;                    /*control information*/
  913.     AddrBlock                         addrBlock;                    /*source/dest. socket address*/
  914.     short                             reqLength;                    /*request/response length*/
  915.     void *                            reqPointer;                    /*->request/response Data*/
  916.     void *                            bdsPointer;                    /*->response BDS */
  917.     union {
  918.         UInt8                             bitMap;                    /*bitmap received */
  919.         UInt8                             numOfBuffs;                /*number of responses being sent*/
  920.         UInt8                             rspNum;                    /*sequence number*/
  921.     }                                 u;
  922. };
  923. typedef struct ATPmisc1                    ATPmisc1;
  924.  
  925. struct ATPmisc2 {
  926.     QElem *                            qLink;                        /*next queue entry*/
  927.     short                             qType;                        /*queue type*/
  928.     short                             ioTrap;                        /*routine trap*/
  929.     Ptr                             ioCmdAddr;                    /*routine address*/
  930.     ATPCompletionUPP                 ioCompletion;                /*ATPCompletionUPP or MPPCompletionUPP*/
  931.     OSErr                             ioResult;                    /*result code*/
  932.     long                             userData;                    /*Command result (ATP user bytes)*/
  933.     short                             reqTID;                        /*request transaction ID*/
  934.     short                             ioRefNum;                    /*driver reference number*/
  935.     short                             csCode;                        /*Call command code*/
  936.     UInt8                             atpSocket;                    /*currbitmap for requests or ATP socket number*/
  937.     UInt8                             atpFlags;                    /*control information*/
  938.     AddrBlock                         addrBlock;                    /*source/dest. socket address*/
  939.     short                             reqLength;                    /*request/response length*/
  940.     void *                            reqPointer;                    /*->request/response Data*/
  941.     void *                            bdsPointer;                    /*->response BDS */
  942.     UInt8                             filler;
  943.     UInt8                             bdsSize;                    /*number of BDS elements */
  944.     short                             transID;                    /*transaction ID recd. */
  945. };
  946. typedef struct ATPmisc2                    ATPmisc2;
  947.  
  948. struct Killparms {
  949.     QElem *                            qLink;                        /*next queue entry*/
  950.     short                             qType;                        /*queue type*/
  951.     short                             ioTrap;                        /*routine trap*/
  952.     Ptr                             ioCmdAddr;                    /*routine address*/
  953.     ATPCompletionUPP                 ioCompletion;                /*ATPCompletionUPP or MPPCompletionUPP*/
  954.     OSErr                             ioResult;                    /*result code*/
  955.     long                             userData;                    /*Command result (ATP user bytes)*/
  956.     short                             reqTID;                        /*request transaction ID*/
  957.     short                             ioRefNum;                    /*driver reference number*/
  958.     short                             csCode;                        /*Call command code*/
  959.     UInt8                             atpSocket;                    /*currbitmap for requests or ATP socket number*/
  960.     UInt8                             atpFlags;                    /*control information*/
  961.     AddrBlock                         addrBlock;                    /*source/dest. socket address*/
  962.     short                             reqLength;                    /*request/response length*/
  963.     void *                            reqPointer;                    /*->request/response Data*/
  964.     void *                            bdsPointer;                    /*->response BDS */
  965.     void *                            aKillQEl;                    /*ptr to i/o queue element to cancel*/
  966. };
  967. typedef struct Killparms                Killparms;
  968.  
  969. union ATPParamBlock {
  970.     ATPparms                         ATP;                        /*General ATP parms*/
  971.     SendReqparms                     SREQ;                        /*sendrequest parms*/
  972.     ATPmisc1                         OTH1;                        /*and a few others*/
  973.     ATPmisc2                         OTH2;                        /*and a few others*/
  974.     Killparms                         KILL;                        /*and a few others*/
  975. };
  976.  
  977. #if OPAQUE_UPP_TYPES
  978.     EXTERN_API(ATalkTransitionEventUPP)
  979.     NewATalkTransitionEventUPP       (ATalkTransitionEventProcPtr userRoutine);
  980.  
  981.     EXTERN_API(MPPCompletionUPP)
  982.     NewMPPCompletionUPP               (MPPCompletionProcPtr    userRoutine);
  983.  
  984.     EXTERN_API(ATPCompletionUPP)
  985.     NewATPCompletionUPP               (ATPCompletionProcPtr    userRoutine);
  986.  
  987.     EXTERN_API(XPPCompletionUPP)
  988.     NewXPPCompletionUPP               (XPPCompletionProcPtr    userRoutine);
  989.  
  990.     EXTERN_API(AttnRoutineUPP)
  991.     NewAttnRoutineUPP               (AttnRoutineProcPtr        userRoutine);
  992.  
  993.     EXTERN_API(MPPProtocolHandlerUPP)
  994.     NewMPPProtocolHandlerUPP       (MPPProtocolHandlerProcPtr userRoutine);
  995.  
  996.     EXTERN_API(DDPSocketListenerUPP)
  997.     NewDDPSocketListenerUPP           (DDPSocketListenerProcPtr userRoutine);
  998.  
  999.     EXTERN_API(void)
  1000.     DisposeATalkTransitionEventUPP    (ATalkTransitionEventUPP userUPP);
  1001.  
  1002.     EXTERN_API(void)
  1003.     DisposeMPPCompletionUPP           (MPPCompletionUPP        userUPP);
  1004.  
  1005.     EXTERN_API(void)
  1006.     DisposeATPCompletionUPP           (ATPCompletionUPP        userUPP);
  1007.  
  1008.     EXTERN_API(void)
  1009.     DisposeXPPCompletionUPP           (XPPCompletionUPP        userUPP);
  1010.  
  1011.     EXTERN_API(void)
  1012.     DisposeAttnRoutineUPP           (AttnRoutineUPP            userUPP);
  1013.  
  1014.     EXTERN_API(void)
  1015.     DisposeMPPProtocolHandlerUPP    (MPPProtocolHandlerUPP    userUPP);
  1016.  
  1017.     EXTERN_API(void)
  1018.     DisposeDDPSocketListenerUPP       (DDPSocketListenerUPP    userUPP);
  1019.  
  1020.     EXTERN_API(long)
  1021.     InvokeATalkTransitionEventUPP    (long                    eventCode,
  1022.                                     ATQEntryPtr                qElem,
  1023.                                     void *                    eventParameter,
  1024.                                     ATalkTransitionEventUPP    userUPP);
  1025.  
  1026.     EXTERN_API(void)
  1027.     InvokeMPPCompletionUPP           (MPPPBPtr                thePBptr,
  1028.                                     MPPCompletionUPP        userUPP);
  1029.  
  1030.     EXTERN_API(void)
  1031.     InvokeATPCompletionUPP           (ATPPBPtr                thePBptr,
  1032.                                     ATPCompletionUPP        userUPP);
  1033.  
  1034.     EXTERN_API(void)
  1035.     InvokeXPPCompletionUPP           (XPPParmBlkPtr            thePBptr,
  1036.                                     XPPCompletionUPP        userUPP);
  1037.  
  1038.     EXTERN_API(void)
  1039.     InvokeAttnRoutineUPP           (short                    sessRefnum,
  1040.                                     short                    attnBytes,
  1041.                                     AttnRoutineUPP            userUPP);
  1042.  
  1043.     EXTERN_API(Boolean)
  1044.     InvokeMPPProtocolHandlerUPP       (Ptr                        SCCAddr1,
  1045.                                     Ptr                        SCCAddr2,
  1046.                                     Ptr                        MPPLocalVars,
  1047.                                     Ptr                        nextFreeByteInRHA,
  1048.                                     Ptr                        ReadPacketAndReadRestPtr,
  1049.                                     short                    numBytesLeftToReadInPacket,
  1050.                                     MPPProtocolHandlerUPP    userUPP);
  1051.  
  1052.     EXTERN_API(Boolean)
  1053.     InvokeDDPSocketListenerUPP       (Ptr                        SCCAddr1,
  1054.                                     Ptr                        SCCAddr2,
  1055.                                     Ptr                        MPPLocalVars,
  1056.                                     Ptr                        nextFreeByteInRHA,
  1057.                                     Ptr                        ReadPacketAndReadRestPtr,
  1058.                                     UInt8                    packetDestinationNumber,
  1059.                                     short                    numBytesLeftToReadInPacket,
  1060.                                     DDPSocketListenerUPP    userUPP);
  1061.  
  1062. #else
  1063.     enum { uppATalkTransitionEventProcInfo = 0x00000FF1 };             /* 4_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  1064.     enum { uppMPPCompletionProcInfo = 0x00009802 };                 /* register no_return_value Func(4_bytes:A0) */
  1065.     enum { uppATPCompletionProcInfo = 0x00009802 };                 /* register no_return_value Func(4_bytes:A0) */
  1066.     enum { uppXPPCompletionProcInfo = 0x00009802 };                 /* register no_return_value Func(4_bytes:A0) */
  1067.     enum { uppAttnRoutineProcInfo = 0x00061002 };                     /* register no_return_value Func(2_bytes:D0, 2_bytes:D1) */
  1068.     enum { uppMPPProtocolHandlerProcInfo = 0x0000007F };             /* SPECIAL_CASE_PROCINFO(7) */
  1069.     enum { uppDDPSocketListenerProcInfo = 0x0000008F };             /* SPECIAL_CASE_PROCINFO(8) */
  1070.     #define NewATalkTransitionEventUPP(userRoutine)                 (ATalkTransitionEventUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppATalkTransitionEventProcInfo, GetCurrentArchitecture())
  1071.     #define NewMPPCompletionUPP(userRoutine)                         (MPPCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMPPCompletionProcInfo, GetCurrentArchitecture())
  1072.     #define NewATPCompletionUPP(userRoutine)                         (ATPCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppATPCompletionProcInfo, GetCurrentArchitecture())
  1073.     #define NewXPPCompletionUPP(userRoutine)                         (XPPCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppXPPCompletionProcInfo, GetCurrentArchitecture())
  1074.     #define NewAttnRoutineUPP(userRoutine)                             (AttnRoutineUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppAttnRoutineProcInfo, GetCurrentArchitecture())
  1075.     #define NewMPPProtocolHandlerUPP(userRoutine)                     (MPPProtocolHandlerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMPPProtocolHandlerProcInfo, GetCurrentArchitecture())
  1076.     #define NewDDPSocketListenerUPP(userRoutine)                     (DDPSocketListenerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDDPSocketListenerProcInfo, GetCurrentArchitecture())
  1077.     #define DisposeATalkTransitionEventUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  1078.     #define DisposeMPPCompletionUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  1079.     #define DisposeATPCompletionUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  1080.     #define DisposeXPPCompletionUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
  1081.     #define DisposeAttnRoutineUPP(userUPP)                             DisposeRoutineDescriptor(userUPP)
  1082.     #define DisposeMPPProtocolHandlerUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  1083.     #define DisposeDDPSocketListenerUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  1084.     #define InvokeATalkTransitionEventUPP(eventCode, qElem, eventParameter, userUPP)  (long)CALL_THREE_PARAMETER_UPP((userUPP), uppATalkTransitionEventProcInfo, (eventCode), (qElem), (eventParameter))
  1085.     #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1086.     #pragma parameter InvokeMPPCompletionUPP(__A0, __A1)
  1087.     void InvokeMPPCompletionUPP(MPPPBPtr thePBptr, MPPCompletionUPP userUPP) = 0x4E91;
  1088.     #else
  1089.         #define InvokeMPPCompletionUPP(thePBptr, userUPP)                 CALL_ONE_PARAMETER_UPP((userUPP), uppMPPCompletionProcInfo, (thePBptr))
  1090.     #endif
  1091.     #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1092.     #pragma parameter InvokeATPCompletionUPP(__A0, __A1)
  1093.     void InvokeATPCompletionUPP(ATPPBPtr thePBptr, ATPCompletionUPP userUPP) = 0x4E91;
  1094.     #else
  1095.         #define InvokeATPCompletionUPP(thePBptr, userUPP)                 CALL_ONE_PARAMETER_UPP((userUPP), uppATPCompletionProcInfo, (thePBptr))
  1096.     #endif
  1097.     #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1098.     #pragma parameter InvokeXPPCompletionUPP(__A0, __A1)
  1099.     void InvokeXPPCompletionUPP(XPPParmBlkPtr thePBptr, XPPCompletionUPP userUPP) = 0x4E91;
  1100.     #else
  1101.         #define InvokeXPPCompletionUPP(thePBptr, userUPP)                 CALL_ONE_PARAMETER_UPP((userUPP), uppXPPCompletionProcInfo, (thePBptr))
  1102.     #endif
  1103.     #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1104.     #pragma parameter InvokeAttnRoutineUPP(__D0, __D1, __A0)
  1105.     void InvokeAttnRoutineUPP(short sessRefnum, short attnBytes, AttnRoutineUPP userUPP) = 0x4E90;
  1106.     #else
  1107.         #define InvokeAttnRoutineUPP(sessRefnum, attnBytes, userUPP)     CALL_TWO_PARAMETER_UPP((userUPP), uppAttnRoutineProcInfo, (sessRefnum), (attnBytes))
  1108.     #endif
  1109.     #define InvokeMPPProtocolHandlerUPP(SCCAddr1, SCCAddr2, MPPLocalVars, nextFreeByteInRHA, ReadPacketAndReadRestPtr, numBytesLeftToReadInPacket, userUPP)  (Boolean)CALL_SIX_PARAMETER_UPP((userUPP), uppMPPProtocolHandlerProcInfo, (SCCAddr1), (SCCAddr2), (MPPLocalVars), (nextFreeByteInRHA), (ReadPacketAndReadRestPtr), (numBytesLeftToReadInPacket))
  1110.     #define InvokeDDPSocketListenerUPP(SCCAddr1, SCCAddr2, MPPLocalVars, nextFreeByteInRHA, ReadPacketAndReadRestPtr, packetDestinationNumber, numBytesLeftToReadInPacket, userUPP)  (Boolean)CALL_SEVEN_PARAMETER_UPP((userUPP), uppDDPSocketListenerProcInfo, (SCCAddr1), (SCCAddr2), (MPPLocalVars), (nextFreeByteInRHA), (ReadPacketAndReadRestPtr), (packetDestinationNumber), (numBytesLeftToReadInPacket))
  1111. #endif
  1112. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  1113. #define NewATalkTransitionEventProc(userRoutine)                 NewATalkTransitionEventUPP(userRoutine)
  1114. #define NewMPPCompletionProc(userRoutine)                         NewMPPCompletionUPP(userRoutine)
  1115. #define NewATPCompletionProc(userRoutine)                         NewATPCompletionUPP(userRoutine)
  1116. #define NewXPPCompletionProc(userRoutine)                         NewXPPCompletionUPP(userRoutine)
  1117. #define NewAttnRoutineProc(userRoutine)                         NewAttnRoutineUPP(userRoutine)
  1118. #define NewMPPProtocolHandlerProc(userRoutine)                     NewMPPProtocolHandlerUPP(userRoutine)
  1119. #define NewDDPSocketListenerProc(userRoutine)                     NewDDPSocketListenerUPP(userRoutine)
  1120. #define CallATalkTransitionEventProc(userRoutine, eventCode, qElem, eventParameter) InvokeATalkTransitionEventUPP(eventCode, qElem, eventParameter, userRoutine)
  1121. #define CallMPPCompletionProc(userRoutine, thePBptr)            InvokeMPPCompletionUPP(thePBptr, userRoutine)
  1122. #define CallATPCompletionProc(userRoutine, thePBptr)            InvokeATPCompletionUPP(thePBptr, userRoutine)
  1123. #define CallXPPCompletionProc(userRoutine, thePBptr)            InvokeXPPCompletionUPP(thePBptr, userRoutine)
  1124. #define CallAttnRoutineProc(userRoutine, sessRefnum, attnBytes)    InvokeAttnRoutineUPP(sessRefnum, attnBytes, userRoutine)
  1125. #define CallMPPProtocolHandlerProc(userRoutine, SCCAddr1, SCCAddr2, MPPLocalVars, nextFreeByteInRHA, ReadPacketAndReadRestPtr, numBytesLeftToReadInPacket) InvokeMPPProtocolHandlerUPP(SCCAddr1, SCCAddr2, MPPLocalVars, nextFreeByteInRHA, ReadPacketAndReadRestPtr, numBytesLeftToReadInPacket, userRoutine)
  1126. #define CallDDPSocketListenerProc(userRoutine, SCCAddr1, SCCAddr2, MPPLocalVars, nextFreeByteInRHA, ReadPacketAndReadRestPtr, packetDestinationNumber, numBytesLeftToReadInPacket) InvokeDDPSocketListenerUPP(SCCAddr1, SCCAddr2, MPPLocalVars, nextFreeByteInRHA, ReadPacketAndReadRestPtr, packetDestinationNumber, numBytesLeftToReadInPacket, userRoutine)
  1127. EXTERN_API( OSErr )
  1128. OpenXPP                            (short *                xppRefnum);
  1129.  
  1130. EXTERN_API( OSErr )
  1131. ASPOpenSession                    (XPPParmBlkPtr             thePBptr,
  1132.                                  Boolean                 async);
  1133.  
  1134. EXTERN_API( OSErr )
  1135. ASPCloseSession                    (XPPParmBlkPtr             thePBptr,
  1136.                                  Boolean                 async);
  1137.  
  1138. EXTERN_API( OSErr )
  1139. ASPAbortOS                        (XPPParmBlkPtr             thePBptr,
  1140.                                  Boolean                 async);
  1141.  
  1142. EXTERN_API( OSErr )
  1143. ASPGetParms                        (XPPParmBlkPtr             thePBptr,
  1144.                                  Boolean                 async);
  1145.  
  1146. EXTERN_API( OSErr )
  1147. ASPCloseAll                        (XPPParmBlkPtr             thePBptr,
  1148.                                  Boolean                 async);
  1149.  
  1150. EXTERN_API( OSErr )
  1151. ASPUserWrite                    (XPPParmBlkPtr             thePBptr,
  1152.                                  Boolean                 async);
  1153.  
  1154. EXTERN_API( OSErr )
  1155. ASPUserCommand                    (XPPParmBlkPtr             thePBptr,
  1156.                                  Boolean                 async);
  1157.  
  1158. EXTERN_API( OSErr )
  1159. ASPGetStatus                    (XPPParmBlkPtr             thePBptr,
  1160.                                  Boolean                 async);
  1161.  
  1162. #define ASPGetStatusSync(paramBlock) ASPGetStatus((paramBlock), false)
  1163. EXTERN_API( OSErr )
  1164. AFPCommand                        (XPPParmBlkPtr             thePBptr,
  1165.                                  Boolean                 async);
  1166.  
  1167. EXTERN_API( OSErr )
  1168. GetLocalZones                    (XPPParmBlkPtr             thePBptr,
  1169.                                  Boolean                 async);
  1170.  
  1171. EXTERN_API( OSErr )
  1172. GetZoneList                        (XPPParmBlkPtr             thePBptr,
  1173.                                  Boolean                 async);
  1174.  
  1175. EXTERN_API( OSErr )
  1176. GetMyZone                        (XPPParmBlkPtr             thePBptr,
  1177.                                  Boolean                 async);
  1178.  
  1179. EXTERN_API( OSErr )
  1180. PAttachPH                        (MPPPBPtr                 thePBptr,
  1181.                                  Boolean                 async);
  1182.  
  1183. EXTERN_API( OSErr )
  1184. PDetachPH                        (MPPPBPtr                 thePBptr,
  1185.                                  Boolean                 async);
  1186.  
  1187. EXTERN_API( OSErr )
  1188. PWriteLAP                        (MPPPBPtr                 thePBptr,
  1189.                                  Boolean                 async);
  1190.  
  1191. EXTERN_API( OSErr )
  1192. POpenSkt                        (MPPPBPtr                 thePBptr,
  1193.                                  Boolean                 async);
  1194.  
  1195. EXTERN_API( OSErr )
  1196. PCloseSkt                        (MPPPBPtr                 thePBptr,
  1197.                                  Boolean                 async);
  1198.  
  1199. EXTERN_API( OSErr )
  1200. PWriteDDP                        (MPPPBPtr                 thePBptr,
  1201.                                  Boolean                 async);
  1202.  
  1203. EXTERN_API( OSErr )
  1204. PRegisterName                    (MPPPBPtr                 thePBptr,
  1205.                                  Boolean                 async);
  1206.  
  1207. EXTERN_API( OSErr )
  1208. PLookupName                        (MPPPBPtr                 thePBptr,
  1209.                                  Boolean                 async);
  1210.  
  1211. #define PLookupNameSync(paramBlock) PLookupName((paramBlock), false)
  1212. EXTERN_API( OSErr )
  1213. PConfirmName                    (MPPPBPtr                 thePBptr,
  1214.                                  Boolean                 async);
  1215.  
  1216. EXTERN_API( OSErr )
  1217. PRemoveName                        (MPPPBPtr                 thePBptr,
  1218.                                  Boolean                 async);
  1219.  
  1220. EXTERN_API( OSErr )
  1221. PSetSelfSend                    (MPPPBPtr                 thePBptr,
  1222.                                  Boolean                 async);
  1223.  
  1224. EXTERN_API( OSErr )
  1225. PKillNBP                        (MPPPBPtr                 thePBptr,
  1226.                                  Boolean                 async);
  1227.  
  1228. EXTERN_API( OSErr )
  1229. PGetAppleTalkInfo                (MPPPBPtr                 thePBptr,
  1230.                                  Boolean                 async);
  1231.  
  1232. EXTERN_API( OSErr )
  1233. PATalkClosePrep                    (MPPPBPtr                 thePBptr,
  1234.                                  Boolean                 async);
  1235.  
  1236. EXTERN_API( OSErr )
  1237. POpenATPSkt                        (ATPPBPtr                 thePBptr,
  1238.                                  Boolean                 async);
  1239.  
  1240. EXTERN_API( OSErr )
  1241. PCloseATPSkt                    (ATPPBPtr                 thePBPtr,
  1242.                                  Boolean                 async);
  1243.  
  1244. EXTERN_API( OSErr )
  1245. PSendRequest                    (ATPPBPtr                 thePBPtr,
  1246.                                  Boolean                 async);
  1247.  
  1248. EXTERN_API( OSErr )
  1249. PGetRequest                        (ATPPBPtr                 thePBPtr,
  1250.                                  Boolean                 async);
  1251.  
  1252. EXTERN_API( OSErr )
  1253. PSendResponse                    (ATPPBPtr                 thePBPtr,
  1254.                                  Boolean                 async);
  1255.  
  1256. EXTERN_API( OSErr )
  1257. PAddResponse                    (ATPPBPtr                 thePBPtr,
  1258.                                  Boolean                 async);
  1259.  
  1260. EXTERN_API( OSErr )
  1261. PRelTCB                            (ATPPBPtr                 thePBPtr,
  1262.                                  Boolean                 async);
  1263.  
  1264. EXTERN_API( OSErr )
  1265. PRelRspCB                        (ATPPBPtr                 thePBPtr,
  1266.                                  Boolean                 async);
  1267.  
  1268. EXTERN_API( OSErr )
  1269. PNSendRequest                    (ATPPBPtr                 thePBPtr,
  1270.                                  Boolean                 async);
  1271.  
  1272. EXTERN_API( OSErr )
  1273. PKillSendReq                    (ATPPBPtr                 thePBPtr,
  1274.                                  Boolean                 async);
  1275.  
  1276. EXTERN_API( OSErr )
  1277. PKillGetReq                        (ATPPBPtr                 thePBPtr,
  1278.                                  Boolean                 async);
  1279.  
  1280. EXTERN_API( OSErr )
  1281. ATPKillAllGetReq                (ATPPBPtr                 thePBPtr,
  1282.                                  Boolean                 async);
  1283.  
  1284. EXTERN_API( void )
  1285. BuildLAPwds                        (Ptr                     wdsPtr,
  1286.                                  Ptr                     dataPtr,
  1287.                                  short                     destHost,
  1288.                                  short                     prototype,
  1289.                                  short                     frameLen);
  1290.  
  1291. EXTERN_API( void )
  1292. BuildDDPwds                        (Ptr                     wdsPtr,
  1293.                                  Ptr                     headerPtr,
  1294.                                  Ptr                     dataPtr,
  1295.                                  AddrBlock                 netAddr,
  1296.                                  short                     ddpType,
  1297.                                  short                     dataLen);
  1298.  
  1299. EXTERN_API( void )
  1300. NBPSetEntity                    (Ptr                     buffer,
  1301.                                  ConstStr32Param         nbpObject,
  1302.                                  ConstStr32Param         nbpType,
  1303.                                  ConstStr32Param         nbpZone);
  1304.  
  1305. EXTERN_API( void )
  1306. NBPSetNTE                        (Ptr                     ntePtr,
  1307.                                  ConstStr32Param         nbpObject,
  1308.                                  ConstStr32Param         nbpType,
  1309.                                  ConstStr32Param         nbpZone,
  1310.                                  short                     socket);
  1311.  
  1312. EXTERN_API( short )
  1313. GetBridgeAddress                (void);
  1314.  
  1315. EXTERN_API( short )
  1316. BuildBDS                        (Ptr                     buffPtr,
  1317.                                  Ptr                     bdsPtr,
  1318.                                  short                     buffSize);
  1319.  
  1320. EXTERN_API( OSErr )
  1321. MPPOpen                            (void);
  1322.  
  1323. EXTERN_API( OSErr )
  1324. LAPAddATQ                        (ATQEntryPtr             theATQEntry);
  1325.  
  1326. EXTERN_API( OSErr )
  1327. LAPRmvATQ                        (ATQEntryPtr             theATQEntry);
  1328.  
  1329. EXTERN_API( OSErr )
  1330. ATPLoad                            (void);
  1331.  
  1332. EXTERN_API( OSErr )
  1333. ATPUnload                        (void);
  1334.  
  1335. EXTERN_API( OSErr )
  1336. NBPExtract                        (Ptr                     theBuffer,
  1337.                                  short                     numInBuf,
  1338.                                  short                     whichOne,
  1339.                                  EntityName *            abEntity,
  1340.                                  AddrBlock *            address);
  1341.  
  1342. EXTERN_API( OSErr )
  1343. GetNodeAddress                    (short *                myNode,
  1344.                                  short *                myNet);
  1345.  
  1346. EXTERN_API( Boolean )
  1347. IsMPPOpen                        (void);
  1348.  
  1349. EXTERN_API( Boolean )
  1350. IsATPOpen                        (void);
  1351.  
  1352. EXTERN_API( void )
  1353. ATEvent                            (long                     event,
  1354.                                  Ptr                     infoPtr);
  1355.  
  1356. EXTERN_API( OSErr )
  1357. ATPreFlightEvent                (long                     event,
  1358.                                  long                     cancel,
  1359.                                  Ptr                     infoPtr);
  1360.  
  1361. /*
  1362.     The following routines are obsolete and will not be supported on
  1363.     PowerPC. Equivalent functionality is provided by the routines
  1364.     above.
  1365. */
  1366. #if TARGET_CPU_68K
  1367. EXTERN_API( OSErr )
  1368. MPPClose                        (void);
  1369.  
  1370. EXTERN_API( OSErr )
  1371. LAPOpenProtocol                    (ABByte                 theLAPType,
  1372.                                  Ptr                     protoPtr);
  1373.  
  1374. EXTERN_API( OSErr )
  1375. LAPCloseProtocol                (ABByte                 theLAPType);
  1376.  
  1377. EXTERN_API( OSErr )
  1378. LAPWrite                        (ATLAPRecHandle         abRecord,
  1379.                                  Boolean                 async);
  1380.  
  1381. EXTERN_API( OSErr )
  1382. LAPRead                            (ATLAPRecHandle         abRecord,
  1383.                                  Boolean                 async);
  1384.  
  1385. EXTERN_API( OSErr )
  1386. LAPRdCancel                        (ATLAPRecHandle         abRecord);
  1387.  
  1388. EXTERN_API( OSErr )
  1389. DDPOpenSocket                    (short *                theSocket,
  1390.                                  Ptr                     sktListener);
  1391.  
  1392. EXTERN_API( OSErr )
  1393. DDPCloseSocket                    (short                     theSocket);
  1394.  
  1395. EXTERN_API( OSErr )
  1396. DDPRead                            (ATDDPRecHandle         abRecord,
  1397.                                  Boolean                 retCksumErrs,
  1398.                                  Boolean                 async);
  1399.  
  1400. EXTERN_API( OSErr )
  1401. DDPWrite                        (ATDDPRecHandle         abRecord,
  1402.                                  Boolean                 doChecksum,
  1403.                                  Boolean                 async);
  1404.  
  1405. EXTERN_API( OSErr )
  1406. DDPRdCancel                        (ATDDPRecHandle         abRecord);
  1407.  
  1408. EXTERN_API( OSErr )
  1409. ATPOpenSocket                    (AddrBlock                 addrRcvd,
  1410.                                  short *                atpSocket);
  1411.  
  1412. EXTERN_API( OSErr )
  1413. ATPCloseSocket                    (short                     atpSocket);
  1414.  
  1415. EXTERN_API( OSErr )
  1416. ATPSndRequest                    (ATATPRecHandle         abRecord,
  1417.                                  Boolean                 async);
  1418.  
  1419. EXTERN_API( OSErr )
  1420. ATPRequest                        (ATATPRecHandle         abRecord,
  1421.                                  Boolean                 async);
  1422.  
  1423. EXTERN_API( OSErr )
  1424. ATPReqCancel                    (ATATPRecHandle         abRecord,
  1425.                                  Boolean                 async);
  1426.  
  1427. EXTERN_API( OSErr )
  1428. ATPGetRequest                    (ATATPRecHandle         abRecord,
  1429.                                  Boolean                 async);
  1430.  
  1431. EXTERN_API( OSErr )
  1432. ATPSndRsp                        (ATATPRecHandle         abRecord,
  1433.                                  Boolean                 async);
  1434.  
  1435. EXTERN_API( OSErr )
  1436. ATPAddRsp                        (ATATPRecHandle         abRecord);
  1437.  
  1438. EXTERN_API( OSErr )
  1439. ATPResponse                        (ATATPRecHandle         abRecord,
  1440.                                  Boolean                 async);
  1441.  
  1442. EXTERN_API( OSErr )
  1443. ATPRspCancel                    (ATATPRecHandle         abRecord,
  1444.                                  Boolean                 async);
  1445.  
  1446. EXTERN_API( OSErr )
  1447. NBPRegister                        (ATNBPRecHandle         abRecord,
  1448.                                  Boolean                 async);
  1449.  
  1450. EXTERN_API( OSErr )
  1451. NBPLookup                        (ATNBPRecHandle         abRecord,
  1452.                                  Boolean                 async);
  1453.  
  1454. EXTERN_API( OSErr )
  1455. NBPConfirm                        (ATNBPRecHandle         abRecord,
  1456.                                  Boolean                 async);
  1457.  
  1458. EXTERN_API( OSErr )
  1459. NBPRemove                        (EntityPtr                 abEntity);
  1460.  
  1461. EXTERN_API( OSErr )
  1462. NBPLoad                            (void);
  1463.  
  1464. EXTERN_API( OSErr )
  1465. NBPUnload                        (void);
  1466.  
  1467. #endif  /* TARGET_CPU_68K */
  1468.  
  1469.  
  1470. #if PRAGMA_STRUCT_ALIGN
  1471.     #pragma options align=reset
  1472. #elif PRAGMA_STRUCT_PACKPUSH
  1473.     #pragma pack(pop)
  1474. #elif PRAGMA_STRUCT_PACK
  1475.     #pragma pack()
  1476. #endif
  1477.  
  1478. #ifdef PRAGMA_IMPORT_OFF
  1479. #pragma import off
  1480. #elif PRAGMA_IMPORT
  1481. #pragma import reset
  1482. #endif
  1483.  
  1484. #ifdef __cplusplus
  1485. }
  1486. #endif
  1487.  
  1488. #endif /* __APPLETALK__ */
  1489.  
  1490.